<!DOCTYPE html>
<html>

	<head>

		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>后台账号操作详情</title>
		<meta name="keywords" content="">
		<meta name="description" content="">
		<link rel="shortcut icon" href="favicon.ico">
		<link href="__STATIC__/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
		<link href="__STATIC__/css/font-awesome.css?v=4.4.0" rel="stylesheet">
		<!-- jqgrid-->
		<link href="__STATIC__/css/plugins/jqgrid/ui.jqgrid.css?0820" rel="stylesheet">
		<link href="__STATIC__/css/animate.css" rel="stylesheet">
		<link href="__STATIC__/css/style.css?v=4.1.0" rel="stylesheet">
		<link href="__STATIC__/css/tool.css" rel="stylesheet">
	</head>

	<body class="gray-bg">
		<div class="wrapper wrapper-content  animated fadeInRight">
			<div class="row">
				<div class="col-sm-12">
					<div class="ibox ">
						<div class="ibox-title">
							<h5>后台账号操作详情</h5>
						</div>
						<div class="toogl_body">
							<div class="toogl_tale">
								<a href="{:url('account_details')}"><input type="button" value="账号详情" class="btn btn-w-m btn-default"></a>
								<a href="{:url('account_registered')}"><input type="button" value="注册账号" class="btn btn-w-m btn-default"></a>
								<a href="{:url('account_operation')}"><input type="button" value="操作记录" class="btn btn-w-m btn-info"></a>
							</div>
							<div class="ibox-content ibox-conte5">
								<form id="form_1" method="post" action="__ROOT__/index.php/Administration/Tool/activity_save" enctype="multipart/form-data" role="form" class="form-inline">
									<div class="form-group form-group-wj">
										<span>账号：</span>
										<input type="text" id="account" class="form-control">
									</div>
									<div class="form-group form-group-wj">
										<span>　姓名：</span>
										<input type="text" id="name" class="form-control">
									</div>
									<div class="form-group form-group-wj">
										<label class="test-item">　选择时间：</label>
										<input id="test1" class="form-control form-con-ban">
										<label class="test-item">-</label>
										<input id="test2" class="form-control form-con-ban">
									</div>
									<div class="form-group form-group-1">
										<label class="control-label">全部操作：</label>
										<select id="activity_type" name="activity_type">
											<option value="">请选择操作</option>
											<option value="1">账号注册</option>
											<option value="2">详情修改</option>
											<option value="3">状态启用</option>
											<option value="4">状态禁用</option>

											<!--<option value="5">给总代赠钻</option>
											<option value="6">添加测试用钻</option>-->
										</select>
									</div>
									<div class="form-group form-group-wj">
										<input type="button" value="查询" class="btn btn-info" id="buttonid" >
									</div>
								</form>
							</div>
							<div class="jqGrid_wrapper">
								<table id="table_list_1"></table>
								<div id="pager_list_1"></div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<!--手机导航-->
		<div class="to-fdh" style="display: none;">
			<img class="to-imgd" src="__STATIC__/img/phonedh.jpg">
			<div class="mob-nrlb">
				<ul>
					<li>
						<a class="mob-nrdh">管理</a>
						<ul class="mob-nryc">
							<li class="mob-nrdhli">
								<a href="{:url('Player/gameplayer')}">玩家管理</a>
							</li>
							<li class="mob-nrdhli">
								<a href="{:url('system/notice')}">公告管理</a>
							</li>
							<li class="mob-nrdhli">
								<a href="{:url('email/mail')}">邮件管理</a>
							</li>
							<li class="mob-nrdhli">
								<a href="{:url('Club/club')}">亲友圈管理</a>
							</li>
							<li class="mob-nrdhli">
								<a href="{:url('Money/money')}">提现管理</a>
							</li>
							<li class="mob-nrdhli">
								<a href="{:url('Order/order')}">订单管理</a>
							</li>
						</ul>
					</li>
					<li>
						<a class="mob-nrdh">数据</a>
						<ul class="mob-nryc">
							<li class="mob-nrdhli">
								<a href="{:url('data/datagk')}">概況</a>
							</li>
							<li class="mob-nrdhli">
								<a href="{:url('data/datawf')}">玩法</a>
							</li>
							<li class="mob-nrdhli">
								<a href="{:url('data/datalc')}">留存</a>
							</li>
							<li class="mob-nrdhli">
								<a href="{:url('data/datass')}">实时数据</a>
							</li>
							<li class="mob-nrdhli">
								<a href="{:url('data/dataczfx')}">充值分析</a>
							</li>
							<li class="mob-nrdhli">
								<a href="{:url('data/dataclub')}">亲友圈统计</a>
							</li>
							<li class="mob-nrdhli">
								<a href="{:url('data/president')}">高级会长</a>
							</li>
						</ul>
					</li>
					<li>
						<a class="mob-nrdh mob-qbh">权限</a>
						<ul class="mob-nryc">
							<li class="mob-nrdhli">
								<a href="{:url('rule/rule_list')}">权限管理</a>
							</li>
							<li class="mob-nrdhli">
								<a href="{:url('rule/rule_group')}">用户组管理</a>
							</li>
							<li class="mob-nrdhli">
								<a href="{:url('account/account_details')}">后台账号管理</a>
							</li>
						</ul>
					</li>
				</ul>
			</div>
		</div>
		<div class="vnl-zz" style="display:none">
			<div><img src="__STATIC__/img/bqhp.gif"></div>
		</div>
		<!--手机适配-->
		<script src="__STATIC__/js/jquery.min.js?v=2.1.4"></script>
		<script src="__STATIC__/js/bootstrap.min.js?v=3.3.6"></script>
		<script src="__STATIC__/js/content.js?v=1.0.0"></script>
		<script src="__STATIC__/js/plugins/validate/jquery.validate.min.js"></script>
		<script src="__STATIC__/js/plugins/validate/messages_zh.min.js"></script>
		<!--<script src="__STATIC__/js/demo/form-validate-demo.js"></script>-->
		<script src="__STATIC__/js/plugins/jqgrid/i18n/grid.locale-cn.js?0820"></script>
		<script src="__STATIC__/js/plugins/jqgrid/jquery.jqGrid.min.js?0820"></script>
		<script src="__STATIC__/js/plugins/peity/jquery.peity.min.js"></script>
		<script src="__STATIC__/js/plugins/laydate/laydate.js"></script>
		<script src="__STATIC__/js/echarts.min.js"></script>
		<script>
            //手机适配
            $(function(){
                if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
                    $("head").append("<link>");
                    var css = $("head").children(":last");
                    css.attr({
                        rel:  "stylesheet",
                        type: "text/css",
                        href: "__STATIC__/css/phone_sp.css"
                    });
                    var mql = window.matchMedia("(orientation: portrait)");
                    if(mql.matches) { //竖屏样式
                        $(".vnl-zz").show();
                        $(".to-fdh").hide();
                    }else{
                        $(".to-fdh").show();
                        $("html").width("100%");
                        $("body").width("100%");
                    }
                    mql.addListener(function(m) {
                        if(m.matches) {
                            // 改变到直立方向
                            $(".vnl-zz").show();
                            $(".to-fdh").hide();
                        }
                        else {
                            $(".to-fdh").show();
                            $(".vnl-zz").hide();
                            $("html").width("100%");
                            $("body").width("100%");
                        }
                    });
                }
            });
            //导航显示展开
            $(".mob-nrdh").click(function(){
                $(this).next().toggle(".mob-nryc");
            });
            $(".to-imgd").click(function(){
                $(this).next().toggle(".mob-nrlb");
            });
            //手机适配end

            $('#buttonid').on('click', function() {     //页面上的button按钮的click事件，重新获取参数后发送参数，然后重新加载数据。
                var username = $("#username").val();
                var account = $("#account").val();
                var start_time = $("#test1").val();
                var end_time = $("#test2").val();
                var operatio_type = $("#activity_type").val();
                $("#table_list_1").jqGrid('setGridParam',{
                    url:'__URL__/Operation_record',
                    datatype:'json',
                    postData:{'username':username,'account':account,'start_time':start_time,'end_time':end_time,'operatio_type':operatio_type},
                    page:1
                }).trigger("reloadGrid"); //重新载入

            });
			//table
			$(document).ready(function() {
				$.jgrid.defaults.styleUI = 'Bootstrap';
				$("#table_list_1").jqGrid({
                    url:"__URL__/Operation_record",
                    datatype:'json',
                    postData:{}, //发送数据
                    mtype: 'POST',
					height: 500,
					autowidth: true,
					shrinkToFit: true,
					rowNum: 20,
					rowList: [20, 50, 100],
					colNames: ['操作时间', '操作名称', '操作人账号', '操作人姓名', '操作对象名称'],
					colModel: [{
							name: 'time',
							index: 'time',
							width: 100,
						},
						{
							name: 'operatio_type',
							index: 'operatio_type',
							width: 100,
                            formatter:function(operatio_type){
                                switch(Number(operatio_type)){
                                    case 1:
                                        return '账号注册';
                                    case 2:
                                        return '详情修改';
                                    case 3:
                                        return '状态启用';
                                    case 4:
                                        return '状态禁用';
                                }
                            }
						},
						{
							name: 'account',
							index: 'account',
							width: 60,
						}, {
							name: 'username',
							index: 'username',
							width: 60,
						},
						{
							name: 'action_object',
							index: 'action_object',
							width: 100,
						}
					],
					pager: "#pager_list_1",
                    loadonce: true,
					viewrecords: true,
					hidegrid: false,
					gridstate: 'hidden'
				});
				$(window).bind('resize', function() {
					var width = $('.jqGrid_wrapper').width();
					$('#table_list_1').setGridWidth(width);
				});
			});

			laydate.render({
				elem: '#test1',
				type: 'datetime'
			});
			laydate.render({
				elem: '#test2',
				type: 'datetime'
			});
		</script>

	</body>

</html>